package Client;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;

public class Client
{

    /**
     * @param args
     * @throws IOException 
     */
    public static void main( String[] args ) throws IOException
    {

        MulticastSocket multicastSocket = new MulticastSocket( 7777 );
        String dirr = "230.0.0.100";
        InetAddress inetAddress = InetAddress.getByName( dirr );
        multicastSocket.joinGroup( inetAddress );
        while( true )
        {
            byte[] arb = new byte[100];
            DatagramPacket datagramPacket = new DatagramPacket( arb, arb.length );
            multicastSocket.receive( datagramPacket );
            String pa = new String( arb );
            System.out.println( pa.split( ";" )[ 0 ] );
        }

    }

}
